package com.itheima.d6_object_stream;

import java.io.Serial;
import java.io.Serializable;

public class User implements Serializable {
    @Serial
    private static final long serialVersionUID = 9184559913367192237L;
    private String name;
    private String password;
    private int age;
    private String address;


    public User(String name, String password,String address) {
        this.address = address;
        this.name = name;
        this.password = password;
    }

    public User() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Override
    public String toString() {
        return  address + ':' +
                 name + ':' +
                 password  ;
    }
}
